#ifndef __GD32_C_A3PN125_H__
#define __GD32_C_A3PN125_H__

#include "gd32f1x0.h"
#include "Config.h"

//@ FPGA SPI1
#define SPI1_NSS		GPIO_PIN_15
#define SPI1_NSS_IO		GPIOA
#define SPI1_SCK		GPIO_PIN_3
#define SPI1_MISO		GPIO_PIN_4
#define SPI1_MOSI		GPIO_PIN_5
#define SPI1_IO			GPIOB

#define FPGA_RST		GPIO_PIN_11
#define FPGA_RST_IO		GPIOC
#define FPGA_INT1		GPIO_PIN_10
#define FPGA_INT1_IO	GPIOC
#define FPGA_INT2		GPIO_PIN_7
#define FPGA_INT2_IO	GPIOF


void FPGA_Reset(void);
void FPGA_Data_Get(u8 command,u16 *fpga_adc_buf, u16 len);
void FPGA_SPI1_Send_Byte(u8 byte);
void FPGA_Init(void);


#endif

